﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class AdminCMS_tab_Class_Fix : System.Web.UI.Page
{
    string FullPath = "00";

    protected void Page_Load(object sender, EventArgs e)
    {
        UIMethod.GetQuery(ref FullPath, "fullpath");
        if (!IsPostBack)
        {
            DataEntity.tab_Class t = new DataEntity.tab_Class();
            t.Select("(cls_StructId + cls_NodeValue) = @fullpath", new string[] { "@fullpath" }, new object[] { FullPath });
            if (!t.IsEmpty)
            {
                RequestQuery.GetEntityValues(t, form1);
            }
            else { UIMethod.Close(); }
        }
    }

    protected void btn_submit_Click(object sender, EventArgs e)
    {
        DataEntity.tab_Class t = new DataEntity.tab_Class(true);
        RequestQuery.SetEntityValues(t, form1);

        t.Update("(cls_StructId + cls_NodeValue) = @fullpath", new string[] { "@fullpath" }, new object[] { FullPath });

        GlocalCache.RemoveApplicationData("ProjectNodes");

        StringBuilder sb = new StringBuilder();
        sb.Append("?fullpath=").Append(FullPath);
        UIMethod.Confirm("修改成功，继续修改吗？", "", "location = 'tab_Class_List.aspx" + sb.ToString() + "';");
    }
}
